<?php

$userid = get_input('user_id');
$code = get_input('code');

if(greengar_confirm_email($userid, $code)) {
    $status = 'Thank you!';
    $message = 'Your email address has been confirmed. Please check your email for further instructions.';
} else {
    $status = 'ERROR';
    $message = 'Your request has been expired or is invalid!';
}
//echo $message;
//echo 123;
$status = urlencode($status);
$message = urlencode($message);
forward("web/confirmation/index.php?status=$status&message=$message");

?>
